package express.after;

import express.IExpressCalculate;
import express.before.BeforeExpressCalculate;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 后最表达式测试
 *
 * @author miweidong
 * @date 2021-08-11 9:15
 */
public class TestAfterExpress {
    public static void main(String[] args) {
        IExpressCalculate calculate = new AfterExpressCalculate();
        List<String> words = new ArrayList<>();
        words.add("(");
        words.add("3");
        words.add("+");
        words.add("4");
        words.add("*");
        words.add("5");
        words.add(")");
        words.add("*");
        words.add("5");
        words.add("-");
        words.add("6");
        BigDecimal bigDecimal = calculate.calculate(words);
        System.out.println(bigDecimal);
    }
}
